package com.nanyang.tms.api.dto.request.forecast;

import java.math.BigDecimal;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import com.nanyang.common.core.domain.ApiRequest;

import lombok.Data;

@Data
public class ForecastDeclareAddReuqest extends ApiRequest{
	@NotEmpty(message = "SKU不能为空")
	@Length(max = 30, message = "SKU长度需小于30个字符")	
	private String sku;
	@NotEmpty(message = "商品英文名称不能为空")
	@Length(max = 100, message = "商品英文名称长度需小于100个字符")		
    private String nameEn;
	@NotEmpty(message = "商品中文名称不能为空")
	@Length(max = 50, message = "商品中文名称长度需小于50个字符")		
    private String nameCn;
	@NotNull(message = "商品数量不能为空")
	@Min(value=1,message = "商品数量必须大于0")
	private Integer quantity;
	@NotNull(message = "商品单价不能为空")
	@Digits(integer = 18, fraction=2, message = "申报商品单价整数部分最多18位小数部分最多2位")
	@DecimalMin(value = "0.01", message = "商品单价必须大于0")
	private BigDecimal price;
	@NotEmpty(message = "申报单位不能为空")
	@Length(max = 20, message = "申报单位长度需小于20个字符")
    private String unitCode;
	@NotNull(message = "申报总价不能为空")
	@Digits(integer = 18, fraction=2, message = "申报总价整数部分最多18位小数部分最多2位")
	@DecimalMin(value = "0.01", message = "总价必须大于0")
    private BigDecimal totalPrice;
	@NotNull(message = "申报重量不能为空")
	@Digits(integer = 18, fraction=2, message = "申报重量整数部分最多18位小数部分最多2位")
	@DecimalMin(value = "0.01", message = "申报重量必须大于0")
    private BigDecimal weight;
	@Length(max = 50, message = "海关编号长度需小于50个字符")		
    private String customsNo;
	@Length(max = 200, message = "备货备注长度需小于200个字符")		
    private String remark;
	@Length(max = 100, message = "图片路径长度需小于100个字符")		
    private String imageUrl;
	@Length(max = 100, message = "销售地址长度需小于100个字符")		
    private String saleSite;
	@Length(max = 30, message = "材质长度需小于30个字符")		
    private String material;
	@Length(max = 30, message = "规则型号需小于30个字符")	
    private String ruleModel;
	@Length(max = 30, message = "用途需小于30个字符")	
    private String purpose;
	@Length(max = 30, message = "品牌需小于30个字符")	
    private String brand;
	@Length(max = 30, message = "行邮税号需小于30个字符")	
    private String postalTax;
    @Override
	public void requestCheck() {
		// TODO Auto-generated method stub
		
	}
}
